import { defineStore } from 'pinia';

export const usedeptStore = defineStore('dept', {
    state: () => ({
        loadding: false,
        deptform: null,
        deptlist: null,
        deptid: null,
        deptnm: null,
        showform: false,
        isselect: false,
    }),
    actions: {
        setnull() {
            this.loadding=false,
            this.deptform=null,
            this.deptlist= null,
            this.deptid= null,
            this.deptnm= null,
            this.showform= false,
            this.isselect= false
        },
        setloadding(loadding) {
            this.loadding = loadding;
        },
        setdeptform(deptform) {
            this.deptform = deptform;
        },
        setdeptlist(deptlist) {
            this.deptlist = deptlist;
        },
        setdeptid(deptid) {
            this.deptid = deptid;
        },
        setdeptnm(deptnm) {
            this.deptnm = deptnm;
        },
        setshowform(showform) {
            this.showform = showform;
        },
        setselect(select) {
            this.isselect = select;
        },
    }
});
